New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

install-packages

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

install-packages

Install dependencies using Yarn with npm fallback.

  • 0.2.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
894
decreased by-15.58%
Maintainers
1
Weekly downloads
 
Created
Source

install-packages NPM version NPM downloads Build Status

Programmatically install npm packages.

This is used by webpack-proxy, here's a preview:

preview

Install

yarn add install-packages

Usage

const install = require('install-packages')

install({
  packages: ['webpack', 'mocha']
})
//=> Promise

API

install(options)

options
packages

Type: string[]

You can omit this to install dependencies from package.json.

cwd

Type: string
Default: process.cwd()

The directory to install packages.

installPeers

Type: boolean
Default: true

Install peer dependencies for corresponding dependency.

peerFilter

Type: (name: string, version: string) => boolean

A function to filter peerDependencies, return true to install it, false otherwise.

saveDev

Type: boolean
Default: false

Install as dev dependencies.

packageManager

Type: string
Possible values: npm yarn

By default we automatically detect package manager.

install.determinePackageManager([cwd])

Determine package manager for specifc directory.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT © EGOIST

Keywords

FAQs

Package last updated on 08 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc